const Pipe = function(ctx,posx,posy,length,speed,img){
	this.posx = posx;
	this.posy = posy;
	this.length = length;
	this.ctx = ctx;
	this.speed = speed;
	this.img = img;
	this.width = 120;
}
Pipe.prototype.update = function(){
	this.posx -= this.speed;
}
Pipe.prototype.render = function(){
	//this.ctx.save();
	/*this.ctx.fillStyle = "F000";
	this.ctx.fillRect(this.posx,this.posy,80,this.length);
	this.ctx.fillStyle = "#74BF2E";
	this.ctx.fillRect(this.posx+5,this.posy+5,70,this.length-10);*/
	this.ctx.drawImage(this.img,this.posx,this.posy,this.width,this.length);

	//this.ctx.restore();
}